package com.bcqn.dao;

import com.bcqn.model.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper {

    int deleteByPrimaryKey(Long userId);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Long userId);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    /**
     * 根据openid 查找用户
     *
     * @param openid
     * @return
     */
    @Select("select * from t_user where wx_openid=${openid}")
    User selectUserByOpenId(@Param("openid") String openid);
}